<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools"></t:base>
<t:datagrid name="systemSettingsList" title="参数管理" actionUrl="systemSettingsController.do?datagrid" fit="true" fitColumns="true" idField="settingName" queryMode="group" sortName="settingName" sortOrder="asc" btnCls="bootstrap btn btn-normal btn-xs">
	<t:dgCol title="参数名称" field="settingName" query="true" width="100"></t:dgCol>
	<t:dgCol title="参数值" sortable="false" field="settingValue" query="false" width="100"></t:dgCol>
	<t:dgCol title="描述" field="description" query="false" width="100"></t:dgCol>
	<t:dgToolBar title="common.edit.param" langArg="参数" icon="fa fa-edit" url="systemSettingsController.do?addorupdate" operationCode="setting_update" funname="updateDialog"></t:dgToolBar>
</t:datagrid>
<script>
    $(function() {
        var datagrid = $("#userListtb");
		datagrid.find("div[name='searchColums']").find("form#userListForm").append($("#realNameSearchColums div[name='searchColumsRealName']").html());
		$("#realNameSearchColums").html('');
        datagrid.find("div[name='searchColums']").find("form#userListForm").append($("#tempSearchColums div[name='searchColums']").html());
        $("#tempSearchColums").html('');
	});
</script>
<script type="text/javascript">
function updateDialog(title,url, id, width, height){
    var rowsData = $('#systemSettingsList').datagrid('getSelections');
    if (!rowsData || rowsData.length==0) {
        tip('请选择编辑项目');
        return;
    }
    if (rowsData.length>1) {
        tip('请选择一条记录再编辑');
        return;
    }
    url += '&settingName='+rowsData[0].settingName;
    createwindow(title,url,width,height);
}
</script>